This is a summary of the primary figures and tests I have completed for Chapter 2 as of my oral exams (April 2018), as well as accompanying notes and questions.
predictors <- site.sum %>% select(cover_LC,cover_TA,canopy_MA,canopy_TA,rugosity) # should it matter if I use site level summary data vs. full follow dataset (where site-level data has been joined?)
pca <- prcomp(na.omit(predictors),center = TRUE,scale. = TRUE)
summary(pca)
## Importance of components:
## PC1 PC2 PC3 PC4 PC5
## Standard deviation 1.7912 1.1130 0.60454 0.33002 0.27993
## Proportion of Variance 0.6417 0.2478 0.07309 0.02178 0.01567
## Cumulative Proportion 0.6417 0.8894 0.96255 0.98433 1.00000
plot(pca,type="l")
ggbiplot(pca, obs.scale = 1, var.scale = 1, groups=site.sum$Island, ellipse = TRUE, circle = TRUE, varname.size = 2) + scale_color_manual(name="Island", values=c("navy", "darkseagreen", "slategray2")) + theme(legend.direction = 'horizontal', legend.position = 'top') + theme_minimal()
ggsave("pca_benth.png")
## Saving 7 x 5 in image
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 18202819 9101410 22.33 1.38e-08 ***
## Residuals 89 36271681 407547
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = FR ~ Island, data = vet20init)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua -80.69712 -618.6796 457.2854 0.9320204
## Bonaire-Antigua 892.24038 464.1018 1320.3789 0.0000097
## Bonaire-Barbuda 972.93750 544.7990 1401.0760 0.0000015
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 0.0535 0.9479
## 89
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 3765399 1882699 25.35 5.73e-10 ***
## Residuals 125 9283349 74267
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = FR ~ Island, data = vir20init, white.adjust = TRUE)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua 315.65455 164.6361 466.6730 0.0000068
## Bonaire-Antigua 364.50714 234.9929 494.0214 0.0000000
## Bonaire-Barbuda 48.85258 -105.4620 203.1672 0.7336418
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 2.2444 0.1102
## 125
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 0.631 0.3155 3.149 0.0477 *
## Residuals 89 8.917 0.1002
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = BR ~ Island, data = vet20init, white.adjust = TRUE)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua 0.05995462 -0.20679424 0.3267035 0.8539726
## Bonaire-Antigua 0.19986289 -0.01242184 0.4121476 0.0693799
## Bonaire-Barbuda 0.13990827 -0.07237646 0.3521930 0.2635451
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 10.329 9.25e-05 ***
## 89
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 0.018 0.00881 0.176 0.839
## Residuals 125 6.248 0.04998
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = BR ~ Island, data = vet20init, white.adjust = TRUE)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua 0.05995462 -0.20679424 0.3267035 0.8539726
## Bonaire-Antigua 0.19986289 -0.01242184 0.4121476 0.0693799
## Bonaire-Barbuda 0.13990827 -0.07237646 0.3521930 0.2635451
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 10.278 7.37e-05 ***
## 125
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 0.631 0.3155 3.149 0.0477 *
## Residuals 89 8.917 0.1002
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 10.329 9.25e-05 ***
## 89
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 0.018 0.00881 0.176 0.839
## Residuals 125 6.248 0.04998
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 10.278 7.37e-05 ***
## 125
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 1290 645.1 6.947 0.00161 **
## Residuals 84 7801 92.9
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 5 observations deleted due to missingness
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = for.bites ~ Island, data = vet20init, white.adjust = TRUE)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua 0.4163004 -8.439851 9.272452 0.9930895
## Bonaire-Antigua 8.5208532 1.696287 15.345420 0.0104552
## Bonaire-Barbuda 8.1045528 1.070381 15.138725 0.0198160
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 1.4821 0.233
## 84
## Df Sum Sq Mean Sq F value Pr(>F)
## Island 2 813 406.7 12.46 1.26e-05 ***
## Residuals 115 3753 32.6
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 10 observations deleted due to missingness
## Tukey multiple comparisons of means
## 95% family-wise confidence level
##
## Fit: aov(formula = for.bites ~ Island, data = vir20init, white.adjust = TRUE)
##
## $Island
## diff lwr upr p adj
## Barbuda-Antigua 3.431446 0.1293407 6.733552 0.0397136
## Bonaire-Antigua 5.966846 3.1227232 8.810969 0.0000067
## Bonaire-Barbuda 2.535400 -0.7532184 5.824018 0.1642219
## Levene's Test for Homogeneity of Variance (center = median)
## Df F value Pr(>F)
## group 2 5.3717 0.005885 **
## 115
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Due to the lack of larger fish in Barbuda, these length-based relationships focus on comparisons between Antigua and Bonaire
vetAB <- vetvirAB %>% filter(Species.Code=="qup")
vet_fr <- lm(FR~Length.cm+Island,data=vetAB)
anova(vet_fr)
## Analysis of Variance Table
##
## Response: FR
## Df Sum Sq Mean Sq F value Pr(>F)
## Length.cm 1 4967075 4967075 15.165 0.0001263 ***
## Island 1 27363708 27363708 83.545 < 2.2e-16 ***
## Residuals 251 82210785 327533
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
virAB <- vetvirAB %>% filter(Species.Code=="stop")
vir_fr <- lm(FR~Length.cm+Island,data=virAB)
anova(vir_fr)
## Analysis of Variance Table
##
## Response: FR
## Df Sum Sq Mean Sq F value Pr(>F)
## Length.cm 1 18101 18101 0.2649 0.6072
## Island 1 5899425 5899425 86.3223 <2e-16 ***
## Residuals 280 19135708 68342
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
# Comparisons with published data
# calculate predicted feeding rates from Bruggemann/Bozec for boxplot reference lines:
FR.vet20=3329-33*20
FR.vir20=1089-17*20-56
# Observed Antigua feeding rate equation:
ANUinit.vir <- data %>% filter(Island=="Antigua"&Phase=="i"&Species.Code=="stop")
ANUinit.vet <- data %>% filter(Island=="Antigua"&Phase=="i"&Species.Code=="qup")
FR.anu.vir <- lm(FR~Length.cm, data=ANUinit.vir)
FR.anu.vet <- lm(FR~Length.cm, data=ANUinit.vet)
summary(FR.anu.vet)
##
## Call:
## lm(formula = FR ~ Length.cm, data = ANUinit.vet)
##
## Residuals:
## Min 1Q Median 3Q Max
## -833.8 -513.2 -102.2 436.9 1391.3
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1047.76 460.25 2.277 0.0282 *
## Length.cm -11.89 17.66 -0.673 0.5047
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 617.4 on 40 degrees of freedom
## Multiple R-squared: 0.0112, Adjusted R-squared: -0.01352
## F-statistic: 0.4531 on 1 and 40 DF, p-value: 0.5047
#FR.anu.vet = 1047-12*L
summary(FR.anu.vir)
##
## Call:
## lm(formula = FR ~ Length.cm, data = ANUinit.vir)
##
## Residuals:
## Min 1Q Median 3Q Max
## -315.25 -173.55 -63.47 138.46 589.65
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 445.037 108.268 4.111 9.31e-05 ***
## Length.cm -8.112 4.472 -1.814 0.0733 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 211.3 on 82 degrees of freedom
## Multiple R-squared: 0.03858, Adjusted R-squared: 0.02685
## F-statistic: 3.29 on 1 and 82 DF, p-value: 0.07335
#FR.anu.vir = 445-8*L
# Observed Bonaire feeding rate equation:
BONinit.vir <- data %>% filter(Island=="Bonaire"&Phase=="i"&Species.Code=="stop")
BONinit.vet <- data %>% filter(Island=="Bonaire"&Phase=="i"&Species.Code=="qup")
FR.bon.vir <- lm(FR~Length.cm, data=BONinit.vir)
FR.bon.vet <- lm(FR~Length.cm, data=BONinit.vet)
summary(FR.bon.vet)
##
## Call:
## lm(formula = FR ~ Length.cm, data = BONinit.vet)
##
## Residuals:
## Min 1Q Median 3Q Max
## -1601.66 -332.61 -12.37 397.51 2137.87
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1347.802 378.678 3.559 0.000552 ***
## Length.cm 9.764 15.193 0.643 0.521792
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 601.9 on 109 degrees of freedom
## Multiple R-squared: 0.003775, Adjusted R-squared: -0.005365
## F-statistic: 0.413 on 1 and 109 DF, p-value: 0.5218
#FR.bon.vet = 1347+10*L
summary(FR.bon.vir)
##
## Call:
## lm(formula = FR ~ Length.cm, data = BONinit.vir)
##
## Residuals:
## Min 1Q Median 3Q Max
## -655.76 -153.40 9.15 199.52 696.42
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1057.197 159.987 6.608 2.25e-09 ***
## Length.cm -17.454 6.153 -2.837 0.00557 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 290.3 on 95 degrees of freedom
## Multiple R-squared: 0.07809, Adjusted R-squared: 0.06838
## F-statistic: 8.047 on 1 and 95 DF, p-value: 0.005572
#FR.bon.vir = 1057-15*L
Bite sizes as predicted by Bruggemann/Bozec: S. vetula: BS.vet=4.01310^-4L^2 S. viride: BS.vir=5.25710^-4L^2
Feeding rates as predicted by Bruggemann/Bozec S. vetula: FR.vet=3329-33L S. viride: FR.vir=1089-17L-56 (extra term because phase modifier is not used here (i=1))
Feeding rates as predicted by observed Bonaire data: S. vetula: FR.bon.vet = 1347+10L S. viride: FR.bon.vir = 1057-15L
Feeding rates as predicted by observed Antigua data: S. vetula: FR.anu.vet = 1047-12L S. viride: FR.anu.vir = 445-8L
# Antigua
feedingrates.vet.ANU <- data %>% filter(Species.Code=="qup"&Phase=="i"&Island=="Antigua") %>% mutate(FR.personal=1047-12*Length.cm) %>% mutate(FR.standard=3329-33*Length.cm) %>% mutate(BS=4.013*10^-4*Length.cm^2)
feedingrates.vir.ANU <- data %>% filter(Species.Code=="stop"&Phase=="i"&Island=="Antigua") %>% mutate(FR.personal = 445-8*Length.cm) %>% mutate(FR.standard=1089-17*Length.cm-56) %>% mutate(BS=5.257*10^-4*Length.cm^2)
# Bonaire
feedingrates.vet.BON <- data %>% filter(Species.Code=="qup"&Phase=="i"&Island=="Bonaire") %>% mutate(FR.personal=1047-12*Length.cm) %>% mutate(FR.standard=1347+10*Length.cm) %>% mutate(BS=4.013*10^-4*Length.cm^2)
feedingrates.vir.BON <- data %>% filter(Species.Code=="stop"&Phase=="i"&Island=="Bonaire") %>% mutate(FR.personal = 1057-15*Length.cm) %>% mutate(FR.standard=1089-17*Length.cm-56) %>% mutate(BS=5.257*10^-4*Length.cm^2)
feedingrates <- bind_rows(feedingrates.vir.ANU,feedingrates.vet.ANU,feedingrates.vir.BON,feedingrates.vet.BON) %>% mutate(AG.personal=FR.personal*BS) %>% mutate(AG.standard=FR.standard*BS)
areagrazed.site <- feedingrates %>% group_by(Site,Island) %>% dplyr::summarize(personal=sum(AG.personal)/1000,standard=sum(AG.standard)/1000)
areagrazed.site <- as.data.frame(areagrazed.site)
AG <- melt(areagrazed.site, id=c("Site","Island")) %>% dplyr::rename("data.source"=variable, "area.grazed"=value)
AG.ANU <- AG %>% filter(Island=="Antigua")
ggplot(data=AG.ANU, aes(x=Site, y=area.grazed, fill=data.source)) +
geom_bar(stat="identity", position=position_dodge()) + theme_bw() + scale_fill_manual(values=c("black","lightslategrey"),name=expression(paste("Feeding rates \n obtained from:")),breaks=c("personal", "standard"), labels=c("fished data", "unfished data")) + labs(y=expression(Area~Grazed~(m^2/hr)), title=("Predicted site-level grazing impact of Antiguan scarids")) + theme(plot.title = element_text(hjust = 0.5)) + theme(axis.text.x = element_text(angle = 45, hjust = 1))
ggsave("areagrazed.png")
## Saving 7 x 5 in image
## Saving 7 x 5 in image
## Saving 7 x 5 in image
vetinit <- data2 %>% filter(Species.Code=="qup" & Phase=="i")
vetinit <- vetinit %>% dplyr::rename(PC1='PC1.x',PC2='PC2.x')
gamm<-gamm(FR~s(Length.cm)+s(scar.BM)+s(PC1)+s(PC2), family=gaussian(link=identity),data=vetinit, random=list(Island=~1),method="REML")
summary(gamm$gam) # only PC1 and PC2 are significant, length slightly, scar.BM is not
##
## Family: gaussian
## Link function: identity
##
## Formula:
## FR ~ s(Length.cm) + s(scar.BM) + s(PC1) + s(PC2)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 1274.6 42.4 30.06 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 4.452 4.452 3.260 0.0269 *
## s(scar.BM) 1.000 1.000 2.993 0.0855 .
## s(PC1) 1.492 1.492 18.228 1.64e-06 ***
## s(PC2) 2.833 2.833 9.709 1.11e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.431
## Scale est. = 3.0742e+05 n = 171
AIC(gamm$lme)
## [1] 2628.616
plot(gamm$gam,pages=1)
gamm<-gamm(g.frac~s(Length.cm)+s(scar.BM)+s(PC1)+s(PC2), family=gaussian(link=identity),data=vetinit, random=list(Island=~1),method="REML")
summary(gamm$gam) # PC1 and PC2 are most significant, length is significant, scar.BM is almost significant
##
## Family: gaussian
## Link function: identity
##
## Formula:
## g.frac ~ s(Length.cm) + s(scar.BM) + s(PC1) + s(PC2)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.41632 0.01252 33.26 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 5.370 5.370 5.419 7.27e-05 ***
## s(scar.BM) 1.000 1.000 7.071 0.00862 **
## s(PC1) 1.000 1.000 40.097 1.95e-09 ***
## s(PC2) 3.535 3.535 12.264 3.60e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.484
## Scale est. = 0.026789 n = 171
AIC(gamm$lme)
## [1] -64.97683
plot(gamm$gam,pages=1)
gamm<-gamm(for.bites~s(Length.cm)+s(scar.BM)+s(PC1)+s(PC2), family=gaussian(link=identity),data=vetinit, random=list(Island=~1),method="REML")
summary(gamm$gam) # very low R2, only PC1 and scar.BM significant
##
## Family: gaussian
## Link function: identity
##
## Formula:
## for.bites ~ s(Length.cm) + s(scar.BM) + s(PC1) + s(PC2)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 12.4857 0.6427 19.43 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 1.000 1.000 0.195 0.6592
## s(scar.BM) 1.000 1.000 2.093 0.1500
## s(PC1) 1.000 1.000 5.748 0.0177 *
## s(PC2) 1.543 1.543 0.694 0.3418
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.17
## Scale est. = 66.495 n = 161
AIC(gamm$lme)
## [1] 1144.704
plot(gamm$gam,pages=1)
virinit <- data2 %>% filter(Species.Code=="stop" & Phase=="i")
virinit <- virinit %>% dplyr::rename(PC1='PC1.x',PC2='PC2.x')
gamm<-gamm(FR~s(Length.cm)+s(scar.BM)+s(PC1)+s(PC2), family=gaussian(link=identity),data=virinit, random=list(Island=~1),method="REML")
summary(gamm$gam) #PC1, length, and scar.BM are significant predictors
##
## Family: gaussian
## Link function: identity
##
## Formula:
## FR ~ s(Length.cm) + s(scar.BM) + s(PC1) + s(PC2)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 466.37 17.92 26.03 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 1.00 1.00 15.856 9.35e-05 ***
## s(scar.BM) 1.00 1.00 4.696 0.0313 *
## s(PC1) 3.12 3.12 17.807 1.22e-10 ***
## s(PC2) 1.00 1.00 1.796 0.1816
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.332
## Scale est. = 69343 n = 216
AIC(gamm$lme)
## [1] 3002.844
plot(gamm$gam,pages=1)
gamm<-gamm(g.frac~s(Length.cm)+s(scar.BM)+s(PC1), family=gaussian(link=identity),data=virinit, random=list(Island=~1),method="REML")
summary(gamm$gam) #PC1, length, and scar.BM are significant predictors
##
## Family: gaussian
## Link function: identity
##
## Formula:
## g.frac ~ s(Length.cm) + s(scar.BM) + s(PC1)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.38137 0.01609 23.7 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 1.000 1.000 9.411 0.00243 **
## s(scar.BM) 1.328 1.328 4.457 0.09082 .
## s(PC1) 3.131 3.131 17.261 2.56e-10 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.318
## Scale est. = 0.055926 n = 216
AIC(gamm$lme)
## [1] 33.45903
plot(gamm$gam,pages=1)
gamm<-gamm(for.bites~s(Length.cm)+s(scar.BM)+s(PC1), family=gaussian(link=identity),data=virinit, random=list(Island=~1),method="REML")
summary(gamm$gam) # no significant predictors (scar.BM almost), low r2
##
## Family: gaussian
## Link function: identity
##
## Formula:
## for.bites ~ s(Length.cm) + s(scar.BM) + s(PC1)
##
## Parametric coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.7838 0.4073 16.66 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Approximate significance of smooth terms:
## edf Ref.df F p-value
## s(Length.cm) 1.000 1.000 2.690 0.102643
## s(scar.BM) 1.000 1.000 0.021 0.885774
## s(PC1) 3.034 3.034 6.959 0.000168 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## R-sq.(adj) = 0.175
## Scale est. = 32.178 n = 194
AIC(gamm$lme)
## [1] 1240.743
plot(gamm$gam,pages=1)